package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.AttendExtraJsonExample.E_ATTEND_PALN_ID;
import static org.jsola.hr.example.AttendExtraJsonExample.E_COMPANY_ID;
import static org.jsola.hr.example.AttendExtraJsonExample.E_EXTRA_TYPE;
import static org.jsola.hr.example.AttendExtraJsonExample.E_JSON_DATA;
import static org.jsola.hr.example.AttendExtraJsonExample.M_ATTEND_PALN_ID_MAX;
import static org.jsola.hr.example.AttendExtraJsonExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.AttendExtraJsonExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.AttendExtraJsonExample.M_JSON_DATA_MAX;
import static org.jsola.hr.example.AttendExtraJsonExample.N_ATTEND_PALN_ID;
import static org.jsola.hr.example.AttendExtraJsonExample.N_COMPANY_ID;
import static org.jsola.hr.example.AttendExtraJsonExample.N_EXTRA_TYPE;
import static org.jsola.hr.example.AttendExtraJsonExample.N_JSON_DATA;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【考勤方案额外数据】的参数")
@Data
public class AttendExtraJsonAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ATTEND_PALN_ID, example = E_ATTEND_PALN_ID)
    @Length(max = 32, message = M_ATTEND_PALN_ID_MAX)
    private String attendPalnId;

    @ApiModelProperty(notes = N_EXTRA_TYPE, example = E_EXTRA_TYPE)
    private Integer extraType;

    @ApiModelProperty(notes = N_JSON_DATA, example = E_JSON_DATA)
    @Length(max = 65535, message = M_JSON_DATA_MAX)
    private String jsonData;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

